﻿<%@ Page Language="C#" MasterPageFile="~/Layouts/Form.Master" AutoEventWireup="true"
    Inherits="HHMMS.UI.Modules.PlanManager.PurchaseSuppliesPlanEdit" CodeBehind="PurchaseSuppliesPlanEdit.aspx.cs" %>

<asp:Content ContentPlaceHolderID="head" ID="idFormTitle" runat="server">
    <title>
        <%if (Bingosoft.Web.Utils.SmartForm.IsInsert())
          { %>
          新增采购配件信息
        <%}
          else if (Bingosoft.Web.Utils.SmartForm.IsEdit())
          { %>
          编辑采购配件信息
        <%}
          else
          { %>
          查看采购配件信息
        <%} %>
    </title>
    <web:Script ID="Script1" src="~/Modules/Workflow/Scripts/init.js" runat="server" />
    <script language="javascript" type="text/javascript">
        var activityName = '<%=Request.QueryString["activityName"] %>';
        var actionType = '<%=Request.QueryString["actionType"] %>';

        $(function () {
            if (activityName == '办理采购手续') {
                $("span[id$='pickParts']").find("img").hide();
            }
        });
    </script>
</asp:Content>
<asp:Content ContentPlaceHolderID="Content" ID="idFormMain" runat="server">
    <!-- 页面头部 -->
    <div class="header">
        <h1>
            <%if (Bingosoft.Web.Utils.SmartForm.IsInsert())
              { %>
              新增采购配件信息
            <%}
              else if (Bingosoft.Web.Utils.SmartForm.IsEdit())
              { %>
              编辑采购配件信息
            <%}
              else
              { %>
              查看采购配件信息
            <%} %>
        </h1>
    </div>
    <div id="container" runat="server">
        <asp:TextBox ID="tbDocId" Name="DocId" runat="server" Width="80%" Visible="false"></asp:TextBox>
        <table cellpadding="2" cellspacing="1" width="100%" class="formitem">
            <caption>
                <%if (Bingosoft.Web.Utils.SmartForm.IsInsert())
                  { %>
                  新增采购配件信息
                <%}
                  else if (Bingosoft.Web.Utils.SmartForm.IsEdit())
                  { %>
                  编辑采购配件信息
                <%}
                  else
                  { %>
                  查看采购配件信息
                <%} %>
           </caption>
            <tbody _disable_="(*.办理采购手续)">
                <tr>
                    <th>
                        配件名称:<font color="red">*</font>
                    </th>
                    <td>
                        <web:SmartPicker ID="pickParts" TextField="PartName" ValueField="PartModel" SelectMode="DiscardPartsSelect" OnClientPicked="onPartChoice" runat="server" Width="220px" Validator="required" />
                    </td>
                    <th>
                        型号规格:<font color="red">*</font>
                    </th>
                    <td>
                        <asp:Label ID="lbPartModel" runat="server" Text="请选择配件"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <th>
                        单位:<font color="red">*</font>
                    </th>
                    <td>
                        <asp:TextBox ID="tbUnit" Name="Unit" runat="server" Width="170px" validator="required,length[1,10]"></asp:TextBox>
                    </td>
                    <th>
                        计划采购数量:<font color="red">*</font>
                    </th>
                    <td>
                        <asp:TextBox ID="tbCount" Name="Count" runat="server" Width="170px" validator="required,digit,length[1,10]"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <th>
                        申请使用班组:<font color="red">*</font>
                    </th>
                    <td>
                        <asp:TextBox ID="tbApplyGroup" Name="ApplyGroup" runat="server" Width="170px" validator="required,length[1,50]"></asp:TextBox>
                    </td>
                    <th>
                        材料计划员:
                    </th>
                    <td>
                        <asp:TextBox ID="tbMaterialPlanUser" Name="MaterialPlanUser" runat="server" Width="170px"
                            validator="length[1,50]"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <th>
                        有关要求:
                    </th>
                    <td colspan="3">
                        <asp:TextBox ID="tbDemand" Name="Demand" runat="server" Width="345px" TextMode="MultiLine" Rows="2" style="overflow:auto;"
                            validator="length[1,1024]" Columns="10"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <th>
                        备注:
                    </th>
                    <td colspan="3">
                        <asp:TextBox ID="tbRemark" Name="Remark" runat="server" Width="345px" TextMode="MultiLine" Rows="2" style="overflow:auto;"
                            validator="length[1,1024]" Columns="10"></asp:TextBox>
                    </td>
                </tr>
            </tbody>
            <tr style="display:none;" _visible_="(*.办理采购手续)">
                <th>
                    到货日期:
                </th>
                <td>
                    <web:DatePicker ID="dpArrivalDate" Name="ArrivalDate" runat="server" ShowTrigger="true"></web:DatePicker>
                </td>
            </tr>
        </table>
    </div>
    <!-- 页脚区域 -->
    <div class="footer">
        <asp:Button ID="btnSave" runat="server" Text="确定" OnClientClick="return validateForm();"
            OnClick="SaveOrUpdatePurchaseSuppliesPlan" />
        <asp:Button ID="btnClose" runat="server" Text="关闭" OnClientClick="return closeForm();" />
    </div>
    <script language="javascript" type="text/javascript">
        function onPartChoice(sender,choiceItems) {
            if (choiceItems.length > 0) {
                $("span[id$='lbPartModel']").text(choiceItems[0].id);
            }
        }
    </script>
</asp:Content>
